Skip to content

🧪 Establish a typed OpenQASM 3 frontend#1910

Draft
burgholzer wants to merge 30 commits into
mainfrom
agent/oq3-foundation
Draft

🧪 Establish a typed OpenQASM 3 frontend#1910
burgholzer wants to merge 30 commits into
mainfrom
agent/oq3-foundation

Conversation

@burgholzer

@burgholzer burgholzer commented Jul 15, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Summary

This draft is an architecture workbench for a typed OpenQASM 3 frontend. It starts from main, keeps the established QuantumComputation importer independent as a behavioral oracle, and builds on MQT Core's handwritten scanner and parser instead of introducing ANTLR.

The production MLIR OpenQASM entry point now uses the staged architecture end to end:

  1. parseOpenQASM produces an opaque parsed program and syntax diagnostics;
  2. analyzeOpenQASM resolves the currently supported source semantics into an MLIR-independent, value-oriented TypedProgram;
  3. emitOQ3 maps the typed program to verified builtin/QC/OQ3 IR without repeating source typing;
  4. LowerOQ3ToQC reports target-capability limitations;
  5. translateQASM3ToQC is only a convenience wrapper around those stages.

The previous 1,114-line direct AST-to-QC visitor has been deleted. There is no legacy MLIR fallback path; Git history and the independent circuit importer provide the comparison points.

The living implementation plan and progress record is in .agent/plans/oq3-foundation.md.

Current implementation

  • The parser and semantic stages are testable without an MLIR context. Source filenames and line/column diagnostics survive into the typed model and emitted MLIR locations.
  • The adapter currently reuses the handwritten parser's constant-evaluation and type-checking passes while constructing its own typed program. Replacing the shared-pointer syntax tree and separate legacy passes remains a later parser milestone; MLIR emission is already a separate walk.
  • Gate definitions and applications, ordered inv/ctrl/negctrl/pow modifiers, broadcasting, qubit and bit registers, measurement, reset, barrier, and current conditional behavior are represented before lowering.
  • The parser now uses one precedence-climbing operator table matching OpenQASM: power is right-associative **, ^ is bitwise XOR, and modulo, shifts, comparisons, equality, bitwise, and logical operators have their specified precedence. Dynamic sin, cos, tan, exp, ln, and sqrt expressions emit builtin MLIR math operations.
  • A canonical MLIR gate catalog drives semantic lookup, OQ3 declarations, and QC lowering. Compatibility mode remains the default so the architecture replacement does not remove established native-gate convenience.
  • Strict mode is explicit: only language gates are implicit, stdgates.inc must be included for standard-library gates, and unavailable standard names can still be defined by the source program.
  • cu, cu3, and cu1 lower natively. Four-parameter cu preserves its control-qubit phase as well as controlled U, and inverse aliases such as iswapdg preserve inversion.
  • Alternating positive and negative controls lower through one recursive rule. Every negative control is flipped before and after the outermost modifier tree, all controls are nested, and the existing QC cleanup combines adjacent nested controls when compact multi-control IR is useful.
  • Valid pow modifiers, including dynamic operands, remain typed OQ3. QC lowering currently emits a target-capability diagnostic until the downstream power support is available.
  • Explicit OPENQASM 3.0;, explicit OPENQASM 3.1;, and versionless inputs select the same maintained OpenQASM 3 profile. OpenQASM 2 remains a compatibility mode.
  • The ANTLR demonstrator and generated sources remain only in Git history.

Validation

  • 98 handwritten-parser tests, including the complete scalar binary-operator precedence and associativity table
  • 4 parser-independent OQ3 verifier/lowering tests
  • 12 dedicated parse, semantic, emission, include-policy, modifier, and target-boundary tests
  • 224 QC translation tests, including all 117 existing source-translation fixtures through the new staged path
  • 116 downstream compiler pipeline tests
  • clean repository lint suite and diff whitespace checks

Next milestones

  • Pin the upstream OpenQASM grammar and conformance corpus as repository test ground truth without adding generated parser code or a parser-generator build dependency.
  • Refactor scanner and parser ownership around compact source spans, recovery, and arena-owned syntax nodes while retaining the completed precedence-climbing expression core.
  • Expand the typed program and semantic analyzer to classical declarations and assignments, inputs/outputs, casts, dynamic operators, while, and inclusive for while preserving state correctly.
  • Add the defensive whole-program OQ3 verifier for cross-operation invariants and broaden strict include/version diagnostics.
  • Add conformance, differential, dominance, overflow, and stage-specific performance evidence.

The reported 80× speedup in Qiskit's openqasm3_parser is architectural inspiration, not an acceptance target. Parsing, semantic analysis, and MLIR emission will be benchmarked separately and should scale approximately linearly.

The textual OQ3 form remains experimental and carries no compatibility guarantee at this stage.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

@burgholzer
burgholzer force-pushed the agent/oq3-foundation branch from dc72a39 to 0535647 Compare July 15, 2026 13:50
@burgholzer burgholzer added QDMI Anything related to QDMI feature New feature or request MLIR Anything related to MLIR and removed QDMI Anything related to QDMI labels Jul 15, 2026
@burgholzer burgholzer added this to the MLIR Support milestone Jul 15, 2026

@denialhaag denialhaag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very excited if we can get this to work nicely! 🙂

The comments below are a brain dump and not necessarily a structured review. I'm aware that some of the points I'm raising might have been planned for future iterations, but I wanted to mention everything that came to mind.

*/
struct OpenQASMLoweringOptions {
/// Whether the selected target can diagnose a zero step at runtime.
bool supportsRuntimeAssertions = false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag is not used anywhere. Might as well delete it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason that this is not a conversion? See, for example, qc-to-qco for more information on how to define a conversion.

Comment thread mlir/unittests/Dialect/OQ3/test_oq3.cpp Outdated
Comment on lines +156 to +171
TEST_F(OQ3Test, LowersEveryCanonicalGateCatalogEntry) {
for (const auto& gate : oq3::getGateCatalog()) {
auto module = buildGateApplication(gate.name, gate.parameterCount,
gate.qubitCount(), gate.qubitCount());
ASSERT_TRUE(succeeded(verify(module.get()))) << gate.name.str();

PassManager manager(context.get());
manager.addPass(oq3::createLowerOQ3ToQCPass());
ASSERT_TRUE(succeeded(manager.run(module.get()))) << gate.name.str();
EXPECT_TRUE(succeeded(verify(module.get()))) << gate.name.str();

bool hasOQ3GateApplication = false;
module->walk([&](oq3::ApplyGateOp) { hasOQ3GateApplication = true; });
EXPECT_FALSE(hasOQ3GateApplication) << gate.name.str();
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test wouldn't be necessary if the lowering were implemented as a conversion that marks the OQ3 dialect as illegal. There are more tests like this that wouldn't be necessary.

Comment thread cmake/ExternalDependencies.cmake Outdated
Comment on lines 32 to 33

endif()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
endif()
endif()

Comment thread docs/mlir/OQ3.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right. See, e.g., QC.md in the same directory for how to do it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a general comment, but I noticed it here:

mqt_mlir_target_use_project_options(${target_name})
endfunction()

add_subdirectory(programs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you copy over all the test cases added in #1862 and amend test_qasm3_translation.cpp accordingly?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is relying on the legacy parser. Do we want that? For example, we do not get the benefit of the MLIR/LLVM error handling. This was one of the triggers for one of the refactors in #1862.

Comment thread mlir/lib/Target/OpenQASM/Frontend.cpp Outdated
Comment on lines +935 to +936
std::istringstream input(
std::string(std::string_view(contents.data(), contents.size())));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here: We wanted to avoid using std::istringstream in #1862 and instead went with LLVM concepts.

@denialhaag denialhaag Jul 15, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As implemented right now, I don't think the parser can handle for and while loops, right? This is another shortcoming of the legacy parser. The lowering of for and while loops in LowerOQ3ToQC.cpp would never be reached.

Comment thread mlir/lib/Dialect/OQ3/IR/OQ3Ops.cpp Outdated
return success();
}

LogicalResult ApplyGateOp::verify() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing I just noticed: What's the overlap of this function with analyzeGateApplication in Frontend.cpp? Are we (partially) doing semantic analysis twice now?

The same might apply to the other OQ3 operations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If semantic analysis does not rely on MLIR but can solely be done by SemanticAnalyzer in Frontend.cpp, how necessary is the OQ3 dialect in the first place? Could the SemanticAnalyzer already reject everything we don't support right now? Loosely speaking, could the functions in LowerOQ3ToQC.cpp just be copied into OpenQASM.cpp, and we achieve the exact same goal?

@mergify mergify Bot added the conflict label Jul 16, 2026
@burgholzer
burgholzer force-pushed the agent/oq3-foundation branch from 2b422b8 to 21bb4bd Compare July 16, 2026 15:18
@mergify mergify Bot removed the conflict label Jul 16, 2026

@denialhaag denialhaag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like where this is going! 🙂

You can find some more quick feedback below. Again, this is not necessarily a structured review.

Comment on lines +1770 to +1771
void emitFor(const frontend::ForStatement& loop, ValueRange gateParameters,
ValueRange gateQubits) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a simplified version of this if start, stop, and step are statically known. Otherwise, we cannot convert any for loop to jeff because it lacks an assert operation.

case frontend::ComparisonKind::NotEqual:
return arith::CmpFPredicate::UNE;
case frontend::ComparisonKind::Less:
return arith::CmpFPredicate::OLT; // spellchecker:disable-line

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes more sense to add this to [tool.typos.default.extend-words].

Comment thread docs/mlir/OpenQASM.md Outdated
Comment on lines +30 to +32
“Adaptive plus Jeff” means the tested public path from QC through optimized QCO,
Jeff byte serialization and deserialization, back to QC, and finally to Adaptive
QIR. Base refers to direct production of the QIR Base Profile.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use "jeff" whenever "`" is recognized (e.g., in Markdown files and in Docstrings). Otherwise, use "jeff" (e.g., in error messages).

Comment thread .agent/plans/oq3-foundation.md Outdated
Comment on lines +151 to +156
- Observation: the Jeff representation cannot preserve the frontend's runtime
`cf.assert` bounds checks. Evidence: genuinely runtime-dynamic indexing
reaches verified QC and QCO but QCO-to-Jeff rejects `cf.assert`; an index
resolved by cleanup traverses the complete chain. The direct emitter now
accepts only indices proven resolvable by conservative scalar dataflow and
reports a source-located target diagnostic for the remainder.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good solution. Dynamic indices should not be rejected at the time of QC emission. At most, reject the conversion to jeff.

Comment on lines +332 to +349
[[nodiscard]] bool
reportRuntimeDynamicIndex(const oq3::frontend::SourceLocation& source) const {
llvm::errs()
<< source.filename << ':' << source.line << ':' << source.column
<< ": OpenQASM QC emission error: runtime-dynamic indexing is not "
"supported by the complete QC/QCO/Jeff/QIR compiler path.\n";
return false;
}

[[nodiscard]] bool
reportRuntimeIntegerCheck(const oq3::frontend::SourceLocation& source) const {
llvm::errs()
<< source.filename << ':' << source.line << ':' << source.column
<< ": OpenQASM QC emission error: checked integer arithmetic "
"and ranges are not supported by the complete QC/QCO/Jeff/QIR "
"compiler path.\n";
return false;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As pointed out elsewhere, one boundary (in this case, jeff) should not reject the emission.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move all header files from this directory to mlir/include/mlir/Target/OpenQASM?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment: We usually use size_t instead of std::size_t. The same also holds for int64_t and so on.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain these changes? Did you find a bug in the current version of the conversion? If so, it might be nice to create a separate PR for this fix so that we can merge it immediately.

@mergify mergify Bot added the conflict label Jul 21, 2026
burgholzer added a commit that referenced this pull request Jul 24, 2026
🤖 *AI text below* 🤖

## Summary

- Anchor the Rust `target/` ignore rule at the repository root.
- Keep nested directories named `target` visible to Git.

## Context

This independent cleanup was found while working on the OpenQASM
integration in #1910. It is unrelated to the OpenQASM frontend itself
and has therefore been extracted into this focused PR.

The existing unanchored rule ignored any directory named `target`,
including source or test fixture directories nested below the repository
root. Cargo's repository-level build output remains ignored by
`/target/`.

## Validation

- `uvx prek run --from-ref origin/main --to-ref HEAD`
- `git diff --check origin/main...HEAD`

No changelog entry is included because this only narrows a
development-only ignore rule.
burgholzer added a commit that referenced this pull request Jul 24, 2026
🤖 *AI text below* 🤖

## Summary

- Register MLIR's canonical `cf.assert`-to-LLVM conversion in both QIR
profiles.
- Cover Base and Adaptive QIR lowering with native assertion regression
tests.
- Split compiler QIR work into a dedicated changelog entry and remove
QIR-only
  PRs from the generic QC/QCO infrastructure entry.

## Context

This general QIR gap was found while working on the OpenQASM integration
in
#1910. OpenQASM runtime preconditions can be represented as `cf.assert`;
the
standard QC → QCO → QC → QIR pipeline should lower those assertions
instead of
rejecting otherwise valid IR. The fix uses MLIR's existing conversion
rather
than introducing OpenQASM-specific handling.

The changelog entry collects the compiler QIR work that was previously
mixed
into the generic infrastructure entry. PRs that also affected QC, QCO,
Jeff, or
broader compiler infrastructure remain listed in both relevant entries;
QIR-only PRs are moved to the QIR entry.

## Validation

- QIR Base conversion tests: 111 passed
- QIR Adaptive conversion tests: 129 passed
- `uvx prek run --from-ref origin/main --to-ref HEAD`
- `git diff --check origin/main...HEAD`

---------

Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
burgholzer added a commit that referenced this pull request Jul 24, 2026
🤖 *AI text below* 🤖

## Summary

- Preserve observable classical result types and returns when converting
a Jeff
  entry point back to QCO.
- Synthesize the legacy `i64` status result only for result-less entry
points.
- Add a measurement-result round-trip regression test.
- Add this fix to the existing Jeff conversion changelog entry.

## Context

This independent Jeff conversion issue was found while exercising
programs from
the OpenQASM integration in #1910. Jeff compatibility is not a
prerequisite for
accepting an OpenQASM program, but when a supported program is converted
through
Jeff, the conversion must not silently replace its observable result.

## Validation

- Jeff round-trip conversion tests: 116 passed
- `uvx prek run --from-ref origin/main --to-ref HEAD`
- `git diff --check origin/main...HEAD`
burgholzer added a commit that referenced this pull request Jul 24, 2026
🤖 *AI text below* 🤖

## Summary

- Teach `TensorIterator` to follow tensor values through `scf.while`.
- Resolve the actual before-region argument → condition operand → result
mapping
  instead of assuming positional identity.
- Support backward traversal from a while result to its corresponding
init
  value.
- Add a regression test with reordered classical and tensor values.
- Add this general SCF/QTensor fix to the existing MLIR infrastructure
changelog
  entry.

## Context

This general SCF/QTensor issue was found while working on loop lowering
for the
OpenQASM integration in #1910. It is independent of the frontend and
applies to
any pipeline that carries linearly typed quantum tensors through
`scf.while`.

## Validation

- QTensor utility tests: 2 passed
- `uvx prek run --from-ref origin/main --to-ref HEAD`
- `git diff --check origin/main...HEAD`

---------

Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
burgholzer added a commit that referenced this pull request Jul 24, 2026
🤖 *AI text below* 🤖

## Summary

- Preserve existing classical iteration arguments and results when the
QC-to-QCO conversion appends explicit QCO and QTensor state to `scf.for`
and `scf.while`.
- Preserve the distinct input and result signatures of type-changing
`scf.while` operations, including reordered `scf.condition` arguments.
- Lower affected structured terminators in a second conversion phase so
their operands use the final region state instead of depending on
dialect-conversion traversal order.
- Teach QCO mapping to distinguish classical loop state from qubit
state, preserve classical terminator operands during hot routing, and
extend type-changing `scf.while` regions with the correct before/after
signatures.
- Add focused pure-QC conversion regressions and mixed-state mapping
regressions for `for` and `while`.
- Add this general conversion fix to the existing MLIR infrastructure
changelog entry.

## Context

This conversion gap was found while working on OpenQASM control flow in
#1910. The fix is independent of that frontend: any QC producer can
create valid `scf.for` or `scf.while` operations whose existing
classical values must survive conversion while quantum state is made
explicit.

## Scope

This PR is limited to stable `scf.for` and `scf.while` state
preservation. It intentionally does not add classical results to
`qco.if` or `qco.index_switch`, and it introduces no scratch
allocations, stores, or loads. Classical `qco.if` results are being
designed separately as an SSA-based extension.

## Validation

- QC-to-QCO conversion tests: 132 passed
- QCO mapping tests: 13 passed
- Focused structured-control-flow conversion regressions: 4 passed
- Focused mixed-state mapping regressions: 2 passed
- `uvx nox -s lint`
- `git diff --check`

---------

Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
burgholzer added a commit that referenced this pull request Jul 25, 2026
🤖 *AI text below* 🤖

## Summary

- Allow `qco.if` and `qco.index_switch` to return ordinary classical SSA
values
  before their existing linear quantum results.
- Preserve result-bearing `scf.if` and `scf.index_switch` operations
through
  QC-to-QCO and QCO-to-QC conversion without introducing scratch memory.
- Update verification, parsing and printing, RegionBranch interfaces,
tied-value helpers, builders, mapping, tensor traversal, module
equivalence,
  and affected optimizations for the segmented result model.
- Keep unsupported Jeff lowering explicit without constraining the
standard
  QC → QCO → QC → QIR pipeline.

## Motivation

This capability was identified while working on the OpenQASM integration
in
#1910 and while reducing the structured-control-flow fixes that became
#1935.
QCO conditionals previously represented only linear quantum results.
Preserving
classical SCF results therefore required either rejecting otherwise
valid
programs or lowering classical state through temporary memory.

The new representation keeps classical values in ordinary SSA form while
retaining QCO's explicit single-use quantum flow:

1. classical result prefix;
2. tied linear quantum result suffix.

Conditional region arguments remain linear-only. Classical inputs
continue to
use normal SSA capture, while `qco.yield` returns the complete
classical-plus-linear result signature.

## Implementation notes

- Both conditional operations use `AttrSizedResultSegments` and expose
explicit
  classical and linear result accessors.
- Custom parsers infer the linear suffix from the `args(...)`
assignments and
  retain quantum-only textual compatibility.
- Parent-aware `qco.yield` verification preserves the stricter modifier
  contracts.
- QC↔QCO conversions retain classical def-use chains directly and
replace only
  linear results with QC references on the QC side.
- Mapping handles every index-switch case and the default region,
preserving
  classical yield operands while realigning only quantum values.
- Module equivalence compares classical yield prefixes positionally
while
  keeping the linear suffix permutation-aware.

## Validation

All affected targets build successfully. The focused suites pass 933
tests in
total:

- 450 QCO IR tests
- 134 QC-to-QCO tests
- 132 QCO-to-QC tests
- 82 QCO utility tests
- 3 QTensor utility tests
- 15 mapping tests
- 117 Jeff round-trip tests

Repository lint, changed-source `clang-tidy`, and `git diff --check`
pass. Two
independent read-only reviews were performed; the final review found no
remaining actionable issues.
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
burgholzer and others added 27 commits July 25, 2026 09:45
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Retain the typed OQ3 dialect and add native lowering coverage for the controlled U gate family while removing the generated parser demonstrator and its dependency.

Assisted-by: GPT-5 via Codex
Record the rebased branch publication and draft pull request refresh in the living ExecPlan.

Assisted-by: GPT-5 via Codex
Introduce an MLIR-independent typed frontend, emit verified OQ3, and lower the production translation path through the experimental dialect. Preserve legacy compatibility gates while making strict standard-library availability explicit.

Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Replace the legacy stream bridge with an LLVM-native parser and semantic pipeline, add structured source state and target lowering, port the behavioral fixtures, and clean the resulting design.

Assisted-by: GPT-5 via Codex
Emit verified QC directly from the staged frontend, exercise accepted programs through QCO, Jeff, and QIR, and preserve observable Jeff entry-point results.

Assisted-by: GPT-5 via Codex
Reject runtime-only indices at the QC boundary, make custom-gate capability checks transitive, and strengthen structured conversion and end-to-end result preservation tests.

Assisted-by: GPT-5 via Codex
Make static-index analysis sound across control flow, enforce one projected-emission budget, reject checked integer constructs that cannot survive Jeff, and strengthen full-chain and native conversion regressions.

Assisted-by: GPT-5 via Codex
Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
Remove unused resolved-program state and reconcile the living plan with the retained conversion evidence and behavior-driven coverage decision.

Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Rebase the frontend on the extracted upstream conversion work, restore the shared MLIR lint policy, lower ordered power modifiers to qc.pow, and extend end-to-end coverage for current QC/QCO/QIR and jeff behavior.

Assisted-by: GPT-5.6 via Codex
@burgholzer
burgholzer force-pushed the agent/oq3-foundation branch from 0ccdb32 to da0859c Compare July 25, 2026 08:11
@mergify mergify Bot removed the conflict label Jul 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v22.1.8) reports: 517 concern(s)
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:58:44: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::TypedProgram" is directly included

       16 |   OpenQASMToQCEmitter(const oq3::frontend::TypedProgram& typedProgram,
          |                                            ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:66:62: warning: [misc-include-cleaner]

    no header providing "mlir::cf::ControlFlowDialect" is directly included

       26 |         .loadDialect<qc::QCDialect, arith::ArithDialect, cf::ControlFlowDialect,
          |                                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:72:3: warning: [misc-include-cleaner]

    no header providing "mlir::OwningOpRef" is directly included

       37 |   OwningOpRef<ModuleOp> emit() {
          |   ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:83:5: warning: [misc-include-cleaner]

    no header providing "mlir::SmallVector" is directly included

       37 |     SmallVector<Value> results;
          |     ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:103:38: warning: [cppcoreguidelines-avoid-const-or-ref-data-members]

    member 'program' of type 'const oq3::frontend::TypedProgram &' is a reference

      103 |   const oq3::frontend::TypedProgram& program;
          |                                      ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:104:16: warning: [cppcoreguidelines-avoid-const-or-ref-data-members]

    member 'context' of type 'MLIRContext &' is a reference

      104 |   MLIRContext& context;
          |                ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:111:3: warning: [misc-include-cleaner]

    no header providing "mlir::DenseMap" is directly included

      111 |   DenseMap<const oq3::frontend::GateDefinition*, bool>
          |   ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:111:33: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::GateDefinition" is directly included

      111 |   DenseMap<const oq3::frontend::GateDefinition*, bool>
          |                                 ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:124:31: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::SourceLocation" is directly included

      124 |   getLocation(const frontend::SourceLocation& source) const {
          |                               ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:129:32: warning: [readability-identifier-naming]

    invalid case style for global constant 'projectedEmissionLimit'

      129 |   static constexpr std::size_t projectedEmissionLimit = 100000;
          |                                ^~~~~~~~~~~~~~~~~~~~~~
          |                                PROJECTED_EMISSION_LIMIT
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:144:50: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ScalarExpression" is directly included

      144 |   isExactlyRepresentableAsDouble(const frontend::ScalarExpression& expression) {
          |                                                  ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:145:38: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ExpressionKind" is directly included

      145 |     if (expression.kind != frontend::ExpressionKind::Constant) {
          |                                      ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:148:38: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ScalarType" is directly included

      148 |     if (expression.type == frontend::ScalarType::Uint) {
          |                                      ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:170:13: warning: [misc-include-cleaner]

    no header providing "mlir::ArrayRef" is directly included

      170 |       const ArrayRef<oq3::frontend::StatementId> statements) {
          |             ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:170:37: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::StatementId" is directly included

      170 |       const ArrayRef<oq3::frontend::StatementId> statements) {
          |                                     ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:173:49: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ForStatement" is directly included

      173 |       if (std::holds_alternative<oq3::frontend::ForStatement>(data) ||
          |                                                 ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:174:49: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::WhileStatement" is directly included

      174 |           std::holds_alternative<oq3::frontend::WhileStatement>(data) ||
          |                                                 ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:175:49: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::IfStatement" is directly included

      175 |           std::holds_alternative<oq3::frontend::IfStatement>(data)) {
          |                                                 ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:179:38: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::GateApplication" is directly included

      179 |           std::get_if<oq3::frontend::GateApplication>(&data);
          |                                      ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:200:35: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ConditionId" is directly included

      200 |   staticCondition(const frontend::ConditionId id) const {
          |                                   ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:202:37: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ConditionKind" is directly included

      202 |     if (condition.kind == frontend::ConditionKind::Literal) {
          |                                     ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:208:22: warning: [readability-convert-member-functions-to-static]

    method 'reportProjectedEmissionLimit' can be made static

      208 |   [[nodiscard]] bool reportProjectedEmissionLimit(
          |                      ^
          |   static 
      209 |       const oq3::frontend::SourceLocation& source) const {
          |                                                    ~~~~~
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:218:50: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::QubitReference" is directly included

      218 |   projectedMultiplicity(const ArrayRef<frontend::QubitReference> references,
          |                                                  ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:324:46: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ScalarDeclarationStatement" is directly included

      324 |                        std::get_if<frontend::ScalarDeclarationStatement>(
          |                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:333:46: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ScalarAssignmentStatement" is directly included

      333 |                        std::get_if<frontend::ScalarAssignmentStatement>(
          |                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:341:46: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::BitAssignmentStatement" is directly included

      341 |                        std::get_if<frontend::BitAssignmentStatement>(
          |                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:348:46: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::MeasurementStatement" is directly included

      348 |                        std::get_if<frontend::MeasurementStatement>(
          |                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:362:46: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ResetStatement" is directly included

      362 |                        std::get_if<frontend::ResetStatement>(&statement.data)) {
          |                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:375:46: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::BarrierStatement" is directly included

      375 |                        std::get_if<frontend::BarrierStatement>(
          |                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:389:45: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ModifierKind" is directly included

      389 |         if (modifier.kind == oq3::frontend::ModifierKind::Pow &&
          |                                             ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:436:23: warning: [readability-convert-member-functions-to-static]

    method 'checkedSignedResult' can be made static

      436 |   [[nodiscard]] Value checkedSignedResult(OpBuilder& opBuilder, Location loc,
          |                       ^
          |   static 
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:454:23: warning: [readability-convert-member-functions-to-static]

    method 'conditionalIntegerMultiply' can be made static

      454 |   [[nodiscard]] Value conditionalIntegerMultiply(OpBuilder& opBuilder,
          |                       ^
          |   static 
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:526:62: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ExpressionId" is directly included

      526 |   Value emitExpression(OpBuilder& opBuilder, const frontend::ExpressionId id,
          |                                                              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:537:29: warning: [readability-implicit-bool-conversion]

    implicit conversion 'bool' -> 'int64_t' (aka 'long')

      537 |             opBuilder, loc, std::get<bool>(expression.constant), 1);
          |                             ^                                  
          |                             static_cast<int64_t>(              )
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:551:13: warning: [misc-include-cleaner]

    no header providing "mlir::APFloat" is directly included

      551 |             APFloat(std::get<double>(expression.constant)));
          |             ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:553:7: warning: [misc-include-cleaner]

    no header providing "llvm_unreachable" is directly included

       24 |       llvm_unreachable("unknown scalar type");
          |       ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:560:11: warning: [misc-include-cleaner]

    no header providing "mlir::isa" is directly included

      560 |       if (isa<FloatType>(operand.getType())) {
          |           ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:588:45: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

      588 |                                             opBuilder.getF64Type(), operand);
          |                                             ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:591:45: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

      591 |                                             opBuilder.getF64Type(), operand);
          |                                             ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:706:58: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

      706 |           return arith::UIToFPOp::create(opBuilder, loc, opBuilder.getF64Type(),
          |                                                          ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:710:56: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

      710 |         return arith::SIToFPOp::create(opBuilder, loc, opBuilder.getF64Type(),
          |                                                        ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:765:20: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::QubitReferenceKind" is directly included

      765 |     case frontend::QubitReferenceKind::Register: {
          |                    ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:766:7: warning: [misc-include-cleaner]

    no header providing "assert" is directly included

       39 |       assert(!reference.dynamicIndex &&
          |       ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:796:24: warning: [misc-include-cleaner]

    no header providing "llvm::function_ref" is directly included

       22 |                  llvm::function_ref<void(ValueRange)> emitResolvedOperation) {
          |                        ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:884:10: warning: [misc-include-cleaner]

    no header providing "mlir::LogicalResult" is directly included

      884 |   static LogicalResult emitPrimitive(OpBuilder& opBuilder, const Location loc,
          |          ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:922:14: warning: [misc-include-cleaner]

    no header providing "mlir::failure" is directly included

      922 |       return failure();
          |              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:932:12: warning: [misc-include-cleaner]

    no header providing "mlir::success" is directly included

      932 |     return success();
          |            ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1070:31: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

     1070 |               opBuilder, loc, opBuilder.getF64Type(), parameter);
          |                               ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1073:31: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

     1073 |               opBuilder, loc, opBuilder.getF64Type(), parameter);
          |                               ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1136:48: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

     1136 |                                opBuilder, loc, opBuilder.getF64Type(), exponent)
          |                                                ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1139:48: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

     1139 |                                opBuilder, loc, opBuilder.getF64Type(), exponent)
          |                                                ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1204:15: warning: [misc-include-cleaner]

    no header providing "mlir::failed" is directly included

     1204 |           if (failed(result)) {
          |               ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1226:49: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

     1226 |         return arith::UIToFPOp::create(builder, builder.getF64Type(), value);
          |                                                 ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1228:47: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

     1228 |       return arith::SIToFPOp::create(builder, builder.getF64Type(), value);
          |                                               ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1243:47: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::BitReference" is directly included

     1243 |   [[nodiscard]] Value readBit(const frontend::BitReference& reference) {
          |                                               ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1276:24: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ComparisonKind" is directly included

     1276 |         case frontend::ComparisonKind::Equal:
          |                        ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1355:34: warning: [readability-identifier-naming]

    invalid case style for global constant 'scalarStateMask'

     1355 |   static constexpr std::uint64_t scalarStateMask = std::uint64_t{1} << 63U;
          |                                  ^~~~~~~~~~~~~~~
          |                                  SCALAR_STATE_MASK
     1356 | 
     1357 |   static std::uint64_t scalarStateKey(const frontend::ScalarId scalar) {
     1358 |     return scalarStateMask | scalar;
          |            ~~~~~~~~~~~~~~~
          |            SCALAR_STATE_MASK
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1357:55: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::ScalarId" is directly included

     1357 |   static std::uint64_t scalarStateKey(const frontend::ScalarId scalar) {
          |                                                       ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1361:52: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::RegisterId" is directly included

     1361 |   static std::uint64_t bitStateKey(const frontend::RegisterId reg,
          |                                                    ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1473:53: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::DeclarationStatement" is directly included

     1473 |           if constexpr (std::is_same_v<T, frontend::DeclarationStatement>) {
          |                                                     ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1520:14: warning: [cppcoreguidelines-slicing]

    slicing object from type 'FloatType' to 'Type' discards 8 bytes of state

     1520 |       return builder.getF64Type();
          |              ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1556:39: warning: [misc-include-cleaner]

    no header providing "mlir::oq3::frontend::RegisterKind" is directly included

     1556 |     if (declaration.kind == frontend::RegisterKind::Qubit) {
          |                                       ^
  • mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1725:21: warning: [readability-avoid-nested-conditional-operator]

    conditional operator is used as sub-expression of parent conditional operator, refrain from using nested conditional operators

     1725 |         positive ? (unsignedEndpoints ? start.ule(stop) : start.sle(stop))
          |                     ^
    /home/runner/work/core/core/mlir/lib/Dialect/QC/Translation/OpenQASMToQCEmitter.cpp:1725:9: note: parent conditional operator here
     1725 |         positive ? (unsignedEndpoints ? start.ule(stop) : start.sle(stop))
          |         ^
  • mlir/lib/Dialect/QC/Translation/TranslateQASM3ToQC.cpp:28:6: warning: [llvm-prefer-static-over-anonymous-namespace]

    function 'printDiagnostics' is declared in an anonymous namespace; prefer using 'static' for restricting visibility

       28 | void printDiagnostics(
          |      ^
  • mlir/lib/Dialect/QC/Translation/TranslateQASM3ToQC.cpp:40:1: warning: [misc-include-cleaner]

    no header providing "mlir::OwningOpRef" is directly included

       21 | OwningOpRef<ModuleOp> translateQASM3ToQC(llvm::SourceMgr& sourceMgr,
          | ^
  • mlir/lib/Dialect/QC/Translation/TranslateQASM3ToQC.cpp:51:7: warning: [misc-include-cleaner]

    no header providing "mlir::failed" is directly included

       22 |   if (failed(verify(*module))) {
          |       ^
  • mlir/lib/Dialect/QC/Translation/TranslateQASM3ToQC.cpp:58:48: warning: [misc-include-cleaner]

    no header providing "mlir::StringRef" is directly included

       58 | OwningOpRef<ModuleOp> translateQASM3ToQC(const StringRef source,
          |                                                ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:54:16: warning: [misc-include-cleaner]

    no header providing "std::size_t" is directly included

       27 | constexpr std::size_t includeNestingLimit = 64;
          |                ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:54:23: warning: [readability-identifier-naming]

    invalid case style for global constant 'includeNestingLimit'

       54 | constexpr std::size_t includeNestingLimit = 64;
          |                       ^~~~~~~~~~~~~~~~~~~
          |                       INCLUDE_NESTING_LIMIT
  • mlir/lib/Target/OpenQASM/Frontend.cpp:55:23: warning: [readability-identifier-naming]

    invalid case style for global constant 'expandedStatementLimit'

       55 | constexpr std::size_t expandedStatementLimit = 100'000;
          |                       ^~~~~~~~~~~~~~~~~~~~~~
          |                       EXPANDED_STATEMENT_LIMIT
  • mlir/lib/Target/OpenQASM/Frontend.cpp:57:20: warning: [llvm-prefer-static-over-anonymous-namespace]

    function 'isStandardLibrary' is declared in an anonymous namespace; prefer using 'static' for restricting visibility

       57 | [[nodiscard]] bool isStandardLibrary(const llvm::StringRef filename) {
          |                    ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:57:50: warning: [misc-include-cleaner]

    no header providing "llvm::StringRef" is directly included

       22 | [[nodiscard]] bool isStandardLibrary(const llvm::StringRef filename) {
          |                                                  ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:61:16: warning: [llvm-prefer-static-over-anonymous-namespace]

    function 'parseBuffer' is declared in an anonymous namespace; prefer using 'static' for restricting visibility

       61 | ParseArtifacts parseBuffer(std::unique_ptr<llvm::MemoryBuffer> buffer,
          |                ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:116:9: warning: [misc-include-cleaner]

    no header providing "mlir::failed" is directly included

       26 |     if (failed(parser.parseProgram())) {
          |         ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:128:9: warning: [misc-include-cleaner]

    no header providing "llvm::SmallVector" is directly included

       21 |   llvm::SmallVector<unsigned> includeTargets;
          |         ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:189:71: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      189 |     expandedBody.insert(expandedBody.end(), builder.getBody().begin() + begin,
          |                                                                       ^
  • mlir/lib/Target/OpenQASM/Frontend.cpp:190:51: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      190 |                         builder.getBody().begin() + end);
          |                                                   ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:23:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       23 |     GateCatalogEntry{"gphase", "gphase", 1, 0, 0, Availability::Language},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=    .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:24:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       24 |     GateCatalogEntry{"U", "U", 3, 0, 1, Availability::Language},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:25:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       25 |     GateCatalogEntry{"id", "id", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:26:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       26 |     GateCatalogEntry{"x", "x", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:27:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       27 |     GateCatalogEntry{"y", "y", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:28:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       28 |     GateCatalogEntry{"z", "z", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:29:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       29 |     GateCatalogEntry{"h", "h", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:30:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       30 |     GateCatalogEntry{"s", "s", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:31:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       31 |     GateCatalogEntry{"sdg", "sdg", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:32:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       32 |     GateCatalogEntry{"t", "t", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:33:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       33 |     GateCatalogEntry{"tdg", "tdg", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:34:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       34 |     GateCatalogEntry{"sx", "sx", 0, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:35:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       35 |     GateCatalogEntry{"p", "p", 1, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:36:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       36 |     GateCatalogEntry{"rx", "rx", 1, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:37:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       37 |     GateCatalogEntry{"ry", "ry", 1, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:38:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       38 |     GateCatalogEntry{"rz", "rz", 1, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:39:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       39 |     GateCatalogEntry{"r", "r", 2, 0, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:40:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       40 |     GateCatalogEntry{"swap", "swap", 0, 0, 2, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=  .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:41:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       41 |     GateCatalogEntry{"cx", "x", 0, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:42:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       42 |     GateCatalogEntry{"cy", "y", 0, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:43:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       43 |     GateCatalogEntry{"cz", "z", 0, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:44:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       44 |     GateCatalogEntry{"ch", "h", 0, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:45:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       45 |     GateCatalogEntry{"cp", "p", 1, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:46:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       46 |     GateCatalogEntry{"crx", "rx", 1, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:47:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       47 |     GateCatalogEntry{"cry", "ry", 1, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:48:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       48 |     GateCatalogEntry{"crz", "rz", 1, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:49:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       49 |     GateCatalogEntry{"ccx", "x", 0, 2, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:50:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       50 |     GateCatalogEntry{"cswap", "swap", 0, 1, 2, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=   .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:51:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       51 |     GateCatalogEntry{"cu", "U", 4, 1, 1, Availability::StandardLibrary},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:52:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       52 |     GateCatalogEntry{"u1", "p", 1, 0, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:53:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       53 |     GateCatalogEntry{"cu1", "p", 1, 1, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:54:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       54 |     GateCatalogEntry{"phase", "p", 1, 0, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=   .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:55:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       55 |     GateCatalogEntry{"cphase", "p", 1, 1, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=    .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:56:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       56 |     GateCatalogEntry{"u2", "u2", 2, 0, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:57:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       57 |     GateCatalogEntry{"u3", "U", 3, 0, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:58:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       58 |     GateCatalogEntry{"u", "U", 3, 0, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:59:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       59 |     GateCatalogEntry{"cu3", "U", 3, 1, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:60:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       60 |     GateCatalogEntry{"CX", "x", 0, 1, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=.primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:61:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       61 |     GateCatalogEntry{"cnot", "x", 0, 1, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=  .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:62:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       62 |     GateCatalogEntry{"c3x", "x", 0, 3, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:63:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       63 |     GateCatalogEntry{"c4x", "x", 0, 4, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:64:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       64 |     GateCatalogEntry{"csx", "sx", 0, 1, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:65:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       65 |     GateCatalogEntry{"sxdg", "sxdg", 0, 0, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=  .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:66:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       66 |     GateCatalogEntry{"c3sqrtx", "sxdg", 0, 3, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name=     .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:67:21: warning: [modernize-use-designated-initializers]

    use designated initializer list to initialize 'GateCatalogEntry'

       67 |     GateCatalogEntry{"prx", "r", 2, 0, 1, Availability::Compatibility},
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      .name= .primitive= .parameterCount= .controlCount= .targetCount= .availability=
    /home/runner/work/core/core/mlir/include/mlir/Target/OpenQASM/GateCatalog.h:27:1: note: aggregate type is defined here
       27 | struct GateCatalogEntry {
          | ^
  • mlir/lib/Target/OpenQASM/GateCatalog.cpp:97:7: warning: [misc-include-cleaner]

    no header providing "llvm::ArrayRef" is directly included

       13 | llvm::ArrayRef<GateCatalogEntry> getGateCatalog() { return CATALOG; }
          |       ^

Have any feedback or feature suggestions? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants